# from vmd.Parser import VmdParser
# from vmd.Logger import VmdLogger
# java的导包简单 python蛋疼
from vmd import IParser as Parser
from vmd import Logger 
from pmd import PmdParser
from vpd import vpdParser
import os
#打开文件
# file=open("motion/wavefile_v2.vmd","rb")
# current_dir=os.path.dirname(__file__)
# print("当前路径",current_dir)
# file_out_put=open(current_dir+"/test/output.txt","w",-1,"utf-8")
# #解析
# vmd=Parser.parse(file)
# Logger.log(file_out_put,vmd)
# file.close()
# file_out_put.close()
# print("请查看输出","test/output.txt")
file_pmd=open("model/gumi.pmd","rb")
def pa():
    p=PmdParser.parse(file_pmd)
    for i in p:
        if i=="header":
            print("解析文件头...")
        if i=="model_name":
            print("解析模型名称...")
            print(p["model_name"])
        if i=="model_comment":
            print("解析模型描述...")
            print(p["model_comment"])
        if i=="vertex":
            print("解析顶点...")
            #print(p["vertex"])
        if i=="index":
            print("解析索引...")
        if i=="material":
            print("解析材质...")
    file_pmd.close()

